<?php

namespace App\Entity;

use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use App\Base\Annotation\Common;
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;

/**
 * @ApiResource()
 * @ODM\Document(repositoryClass="App\Repository\CommentTextRepository")
 */
class CommentText
{
    /**
     * @Common(cnName="#",editType="text",listType="text")
     * @ODM\Id(strategy="INCREMENT")
     * @ORM\Id()
     * @ORM\GeneratedValue()
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @Common(cnName="文本",editType="text",listType="text")
     * @ODM\Field( nullable=true)
     * @ORM\Column(type="string", length=255)
     */
    private $text;

    /**
     * @Common(cnName="数字",editType="text",listType="text")
     * @ODM\Field( nullable=true)
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $num;

    /**
     * @Common(cnName="排序",editType="text",listType="text")
     * @ODM\Field( nullable=true)
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $sort;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getText(): ?string
    {
        return $this->text;
    }

    public function setText(string $text): self
    {
        $this->text = $text;

        return $this;
    }

    public function getNum(): ?string
    {
        return $this->num;
    }

    public function setNum(?string $num): self
    {
        $this->num = $num;

        return $this;
    }

    public function getSort(): ?string
    {
        return $this->sort;
    }

    public function setSort(?string $sort): self
    {
        $this->sort = $sort;

        return $this;
    }
}
